<template>
	<view>
		<view class="lb-main-32">
			<u-parse :content="rowData.content"></u-parse>
		</view>
	</view>
</template>

<script>
	import {
		getAgreementApi
	} from "@/api/apis/comm.js"
	export default {
		data() {
			return {
				content: '这是协议',
				tagStyle: {
					// 字符串的形式
					// div: 'font-size:28rpx',
					// p: 'font-size:28rpx',
					// span: 'font-size: 28rpx',
					// img: 'width: 100%'
				},
				type: '',
				rowData: '',
			}
		},
		methods: {
			getData() {
				uni.showLoading({
					title: '请求中',
					mask: true
				});
				getAgreementApi({
					type: this.type
				}).then(res => {
					uni.hideLoading();
					if (res.code == 1) {
						this.rowData = res.data;
					}
				})
			}
		},
		onLoad(options) {
			this.type = options.type && options.type != undefined ? options.type : 1;
			let navName = '洗护协议';
			if (this.type == 2) {
				navName = '隐私协议';
			}

			uni.setNavigationBarTitle({
				title: navName,
			})
			this.getData();
		}
	}
</script>

<style>

</style>